//
// Created by ASUS on 2022/7/28.
//

#ifndef LIVEP_ADMIN_H
#define LIVEP_ADMIN_H

#include "IUser.h"
#include "msg.h"
#include <cstring>

class Admin : public virtual IUser {
public:
    void *Login() override {
        if (strcmp(this->username, "admin") != 0 || strcmp(this->password, "admin") != 0) {
            return (void *) AdminLoginFail;
        }
        return (void *) AdminLoginSuccess;
    }

    Admin(char *username, char *password) {
        this->username = username;
        this->password = password;
    }

private:
    char *username;
    char *password;
};

#endif //LIVEP_ADMIN_H
